import router from './router.js'
import store from '@/store'


//全局前置路由
router.beforeEach((to,from,next) => {
    if(store.state.token === '' && to.name != 'Login'){
        next({name:'Login'})
    }else{
        next()
    }
})

export default router